package com.linxianqin.springbootVue.domain.convert;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.linxianqin.springbootVue.domain.dto.SysOperLogDTO;
import com.linxianqin.springbootVue.domain.entity.SysOperLog;
import com.linxianqin.springbootVue.domain.vo.SysOperLogExcel;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;


/**
 * 功能描述：SysOperLog转化接口
 * @author lxq
 * @version 1.00
 * @Date 2020/12/13
 */
@Mapper
public interface SysOperLogConvert {
    SysOperLogConvert INSTANCE = Mappers.getMapper(SysOperLogConvert.class);

    @Mappings({
            @Mapping(target = "params",ignore = true),
    })
    SysOperLogDTO entity2dto(SysOperLog sysUser);

    SysOperLog dto2entity(SysOperLogDTO dto);


    @Mappings({
            @Mapping(target = "ascs",ignore = true),
            @Mapping(target = "asc",ignore = true),
            @Mapping(target = "descs",ignore = true),
            @Mapping(target = "desc",ignore = true),
    })
    Page<SysOperLog> dto2entity(Page<SysOperLogDTO> logininforPage);
    @Mappings({
            @Mapping(target = "ascs",ignore = true),
            @Mapping(target = "asc",ignore = true),
            @Mapping(target = "descs",ignore = true),
            @Mapping(target = "desc",ignore = true),
    })
    Page<SysOperLogDTO> entity2dto(Page<SysOperLog> logininforPage);

//    List<SysOperLogExcel> entity2Excel(List<SysOperLog> list);
}
